Encapsulator

data class Encapsulator<T : Any>(klass: KClass<T>, serializer: KSerializer<T>)

Functions

encapsulate
Link copied to clipboard
common
fun <O> encapsulate(value: Any, callback: KSerializer<T>.(T) -> O): O?

Properties

klass
Link copied to clipboard
common
val klass: KClass<T>
serializer
Link copied to clipboard
common
val serializer: KSerializer<T>

Extensions

tryEncode
Link copied to clipboard
fun <T : Any> Encapsulator<T>.tryEncode(encoder: Encoder, value: Any): Unit?
fun <T : Any> Encapsulator<T>.tryEncode(encoder: Encoder, value: Any): Unit?
fun <T : Any> Encapsulator<T>.tryEncode(encoder: Encoder, value: Any): Unit?